<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up()
    {
        Schema::create('students', function (Blueprint $table) {
            $table->id();
            $table->string('student_code'); // 学号
            $table->string('name'); // 学生姓名
            $table->enum('gender', ['男', '女']); // 性别
            $table->foreignId('clazz_id'); // 班级ID（外键）
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('students');
    }
};
